package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Great;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GreatMapper {
    int deleteByPrimaryKey(Long id);

    Great selectByPrimaryKey(Long id);

    List<Great> selectAll();

    Integer selectForTotalCount(@Param("greatType") String greatType, @Param("greatTypeId") Long greatTypeId);

    Great selectGreatByGreatTypeIdAndUserId(@Param("greatType") String greatType,
                                            @Param("greatTypeId") Long greatTypeId, @Param("userId") Long userId);

    void removeGreatByGreatTypeIdAndUserId(@Param("greatType") String greatType,
                                           @Param("greatTypeId") Long greatTypeId, @Param("userId") Long userId);

    void saveGreatByGreatTypeIdAndUserId(@Param("greatType") String greatType,
                                         @Param("greatTypeId") Long greatTypeId, @Param("entity") Great entity);

    void updateState(@Param("array") Long[] array);

    Integer selectSponsorNumber(@Param("sponsorId") Long sponsorId);

    List<Great> selectByAuthorId(QueryObject qo);
}